import { Component, OnInit } from '@angular/core';


@Component({
  selector: 'app-my-dd-list',
  templateUrl: './my-dd-list.component.html',
  styleUrls: ['./my-dd-list.component.scss']
})
export class MyDdListComponent implements OnInit {

  constructor() { }

  ngOnInit(): void {
    var text: any;
    var swiper = new Swiper('.vip_user_order', {
      autoHeight: true, //enable auto height
      // pagination: '.order_nav',
      pagination: {
        el: '.order_nav',
        clickable: true,
        renderBullet: function (index, className) {
          switch (index) {
            case 0:
              text = '全部';
              break;
            case 1:
              text = '交易中';
              break;
            case 2:
              text = '已完成';
              break;
            case 3:
              text = '待评价';
              break;
          }
          return '<a class="' + className + '">' + text + '</a>';
        },
      },

      // paginationClickable: true,
      // paginationBulletRender: function (swiper,index, className) {
      // switch (index) {
      //     case 0: name='全部';break; 
      //     case 1: name='待付款';break;
      //     case 2: name='待发货';break;
      //     case 3: name='已成交';break;
      //     default: name='';
      // }
      //         return '<a class="' + className + '">' + name + '</a>';
      //     }

    });


  }

}
